﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ImTag.Silverlight
{
    public partial class SearchResultPanel : UserControl
    {
        public SearchResultPanel()
        {
            InitializeComponent();
        }

        public IEnumerable<Thumbnail> Result
        {
            set
            {
                this.ImageWrapPanel.Children.Clear();
                foreach (var thumb in value)
                    this.ImageWrapPanel.Children.Add(thumb);
                if (value.Count() == 0)
                    this.ImageWrapPanel.Children.Add(new TextBlock() { Text = "No results found..." });
            }
        }
    }
}
